Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODPart


FulfillPromise

The FulfillPromise method should fulfill a promise by providing the content data the promise represents.

void FulfillPromise (in ODStorageUnitView promiseSUView);
promiseSUView
A reference to a storage-unit view object that contains the promise. This is the same value created by the storage unit's SetPromiseValue method.
DISCUSSION
A promise is a specification of data to be transferred at a future time. For data interchange using drag and drop or the clipboard, the part transferring data should usually delay the actual data transfer, instead providing a promise that is fulfilled only when the transfer is ultimately required.

If a data transfer involves a very large amount of data, your part can choose to put out a promise instead of actually writing the data to a storage unit. Your FulfillPromise method can then write the actual data only if and when a transfer to another part occurs. When cloning in the FulfillPromise method, the clone kind should be the same as the one used when the promise was written. OpenDoc calls this method when a promise must be fulfilled.

OVERRIDING
When you subclass ODPart, you can override this method. Your override method must not call its inherited method; that is, your override method must implement this method's functionality completely.

EXCEPTIONS
kODErrNoPromises
This part did not make the promise.
SEE ALSO
The ODStorageUnit::SetPromiseValue method (page 711).
Table 2-1 on page 89 in OpenDoc Programmer's Guide.
"The CloneInto Method of Your Part Editor" on page 327 in OpenDoc Programmer's Guide.
"Fulfilling a Promise" on page 331 in OpenDoc Programmer's Guide.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help